Currently, the search status spinner animation restarts on every
single keystroke while a search is in progress. This occurs because
redundant calls to `play()` replace the previous content and restart
the animation from the beginning.
This commit fixes this by ignoring redundant `play()` and `stop()` calls.
Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8695
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4191>
}
play() {
+ if (this._playing)
+ return;
this.remove_all_transitions();
this.set_content(new St.SpinnerContent());
this.show();
}
stop() {
+ if (!this._playing)
+ return;
this.remove_all_transitions();
if (this._animate) {
this.hide();
}
}
+
+ get _playing() {
+ return this.visible && this.content !== null;
+ }
});